package com.payment.ktb.activity;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.view.ViewPager;

import com.payment.ktb.R;
import com.payment.ktb.adapter.GuidePagerAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by syd on 2016/8/3.
 */
public class GuideActivity extends BaseActivity {

    private List<Drawable> listData;
    private GuidePagerAdapter adapter;

    @BindView(R.id.vp_guide)
    ViewPager vp_guide;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        ButterKnife.bind(this);
        initView();

    }

    private void initView() {

        //data
        listData = new ArrayList<Drawable>();
        // 初始化引导图片列表
        listData.add(getResources().getDrawable(R.mipmap.userguide1));
        listData.add(getResources().getDrawable(R.mipmap.userguide2));
        listData.add(getResources().getDrawable(R.mipmap.userguide3));

        //adapter
        adapter = new GuidePagerAdapter(listData,mContext);

        //bind
        vp_guide.setAdapter(adapter);
    }
}
